package com.example.test.newtab;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTabHost;

import com.example.test.R;

public class FragmentTabs extends FragmentActivity {
	private FragmentTabHost mTabHost;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.fragment_tabs);
		mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);
		mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);

		mTabHost.addTab(mTabHost.newTabSpec("simple").setIndicator("Simple"),
				CountingFragment.class, null);
		mTabHost.addTab(mTabHost.newTabSpec("contacts")
				.setIndicator("Contacts"), CountingFragment01.class, null);
		mTabHost.addTab(mTabHost.newTabSpec("custom").setIndicator("Custom"),
				CountingFragment.class, null);
		mTabHost.addTab(mTabHost.newTabSpec("throttle")
				.setIndicator("Throttle"), CountingFragment01.class, null);
	}
}
